// -*- mode: c++; coding: utf-8 -*-

#ifndef _OCULUS
#define _OCULUS

#include <Ice/BuiltinSequences.ice>

#include "Types.ice"

module Oculus
{	 

  interface PA
  {
    /**
     * Notify a surveillance event.
     * @param qe The event to analyse.
     **/
    ["ami"] void notify (VideoEvent ev);    

    // TODO
    void clean ();
  };
  
  interface NA
  { 
    /**
     * Notify a surveillance event.
     * @param qe The event to analyse.
     **/
    void notify (ObjectInfoEvent info);    

    // TODO
    void clean ();
  };

  exception AlreadySubscribed {};

  interface Blackboard
  {
    /**
     * Read a slot of the blackboard.
     * @param id The identifier of the slot.
     * Return The blackboard information.
     **/
    idempotent T read (TID id);

    /**
     * Read n slots of the blackboard.
     * @param seqid The identifiers of the slots.
     * Return The blackboard information.
     **/
    idempotent TSeq readSeq (TIDSeq seqid);

    /**
     * Read all the slots of the blackboard.
     * Return The blackboard information.
     **/
    idempotent TSeq readAll ();

    /**
     * Write onto the blackboard.
     * @param data The data to be written.
     **/
    void write (TSeq data);
  };

  interface ENA
  {
    /**
     * Notify that a blackboard was updated.
     **/
    void notify (TSeq info);

    // TODO
    void clean ();
  };

  interface Sniffer
  {
    ["ami"] void notify (int camera, int frame, 
			 string field, double value);
  };

};

#endif
